package com.yjd.bi.jf.dao.impl;

import java.util.Map;

import org.springframework.stereotype.Component;

import com.yjd.bi.jf.dao.IJfIntegralDao;
import com.yjd.bi.jf.model.JfIntegralModel;
import com.yjd.comm.base.dao.impl.BaseDaoImpl;

/**
 * <b>description</b>：会员积分表数据访问层 <br>
 * <b>time</b>：2017-03-07 15:06:52 <br>
 * <b>author</b>： ready percy-chen@hotmail.com
 */
@Component("jfIntegralDao")
public class JfIntegralDaoImpl extends BaseDaoImpl implements IJfIntegralDao {

	private static final String SQLMAPNAMESPACE = JfIntegralModel.class.getName();
	private static final String PKNAME = "user_id";

	@Override
	public String getPrimaryKeyName() {
		return PKNAME;
	}

	@Override
	public String getSqlmapNamespace() {
		return SQLMAPNAMESPACE;
	}
	
	@Override
	public Integer getSummary(Map<String, Object> paramMap) throws Exception {
		return (Integer) this.getSqlMap(false).queryForObject(
				getStatement("getSummary"), paramMap);
	}
}
